﻿using PetaPoco;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BrnMall.Manager.Domain.WeChat
{
    /// <summary>
    /// 永久授权码
    /// </summary>
    [TableName("wechat_PermanentCode")]
    [PrimaryKey("id")]
    public class PermanentCodeInfo
    {
        public int Id { get; set; }

        public int StoreId { get; set; }

        /// <summary>
        /// 企业微信永久授权码,最长为512字节
        /// </summary>
        public string permanent_code { get; set; }
        /// <summary>
        /// 授权方企业微信id
        /// </summary>
        public string corpid { get; set; }
        /// <summary>
        /// 所绑定的企业微信主体名称
        /// </summary>
        public string corp_full_name { get; set; }

        /// <summary>
        /// 企业应用ID
        /// </summary>
        public int agentid { get; set; }
        /// <summary>
        /// 授权方应用名字
        /// </summary>
        public string app_name { get; set; }

        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime AddTime { get; set; }

        /// <summary>
        /// 企业的 access_token
        /// </summary>
        public string access_token { get; set; }

        /// <summary>
        /// 上一次获取access_token的时间,(如果超过2小时，必须重新获取)
        /// </summary>
        public DateTime last_expires { get; set; }
    }
}
